home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
UTIL
/
SYS
/
SHELLC
/
!ShellC
/
!ReadMe
< prev
next >
Wrap
Text File
|
1992-03-11
|
7KB
|
163 lines
> !ShellC.!ReadMe 0.20 (11-Mar-1992)
Contents:
1.) What is ShellC ?
2.) What is a CLI shell ?
3.) How can I compile C programs using ShellC ?
4.) Controlling C compiler features
5.) Before starting ...
6.) Advanced features of ShellC
7.) The 'claim all' option
8.) How are file compiled ?
1.) What is ShellC ?
This program serves two purposes:
- It is a window-based CLI shell, you may type *commands and examine their
output in the window (try e.g. MODULES).
- It gives easy desktop access to the Acorn C compiler, and gives you the
opportunity to examine the output of the compiler in a window.
2.) What is a CLI shell ?
A CLI shell is a user interface to operating system commands (under RISC OS
called *commands). Unfortunately, the CLI shell of RISC OS is not
multitasking and does not run in a window. ShellC is a pre-version of a
window-based CLI_Shell. It is similar to the TaskWindow of !Edit, but it
executes commands as a whole and displays their output in its window after
the command has been executed. Edit's TaskWindow, however, gains control
while the command is executed, so it is much slower and it needs !Edit to be
loaded.
3.) How can I compile C programs using ShellC ?
ShellC provides easy desktop access to the Acorn C compiler Release 3. A C
file may be compiled by dragging it (or the c directory containing it) on
the !ShellC icon on the icon bar. The output of the Ccompiler is then
displayed in the shell window and can be examined using the scroll bars of
the window. The shell checks if a directory or file dragged to its icon is
valid (i.e. if it is either a directory called 'c' containing a source file
or if it is a source file in a directory called 'c'), compiles it and
displays the output of the compiler in its window.
To recompile the file, simply press F2, click on the ShellC icon with Adjust
or choose recompile from the shell window's menu.
4.) Controlling C compiler features
The shell uses a MakeFile to compile C source files. All compiler and linker
flags are controlled by the ConfigC application that is started by choosing
'Configure' from ShellC's iconbar menu.
It gives you access to almost all compiler and linker flags and you may
specify the filename of the output file either as an explicit name (e.g.
!RunImage) or to be the same as the source filename.
The 'Memory allocation' options give you control over the amount of memory
that is allocated to the next slot before the compiler is started. If you
select 'all memory', all but 32k are allocated to the next slot.
Note that any changes only come into effect if you click on the Save button.
5.) Before starting ...
***************************************************************************
* *
* Before you can use the shell to compile C programs, you must set the *
* variable C$Place in ShellC's !Run file to the directory containing your *
* compiler (Acorn C Release 3) (this is the directory containg e.g. the *
* directories CLib, Library, ...). *
* *
***************************************************************************
6.) Advanced features of ShellC
Using *ShellObey <command> you can send a command string to the shell. It
is executed as if it was typed in.
If you supply the -a flag (i.e. ShellObey -a <command>), all free memory is
allocated to the 'next slot' before executing the command.
If you supply the -s flag, the memory specified by the last *ShellSlot
command is allocated to the 'next slot' before executing the command. So,
e.g. *ShellSlot 64
*ShellObey -s HelloWorld
runs the HelloWorld program with 64kB memory in the shell window.
*ShellSlot <size> gives the size in kB to allocate to the 'next slot' if
ShellObey -s is used.
7.) The 'claim all' option
If 'claim all' is switched off, only the output of *commands is displayed
in the window and if a non-wimp task is started, it gets a RISC OS standard
task-window.
If 'claim all' is selected, the output of tasks is claimed, too. This
means, that e.g. the output of the C compiler is displayed in the shell
window and not in a RISC OS command window.
8.) How are files compiled ?
The compilation of a file is done as follows:
The shell module task gets a message if a file is dragged to its icon.
It starts !CompFile, giving the name of the file as parameter. !CompFile
sets the slot for the BASIC program CompFile, which reads the !Options file
created by ConfigC and works out the command string to pass to the amu
(Acorn Make Utility), which is used to compile the source file. CompFile
then issues a *ShellObey command to pass the amu command to the shell. A
Makefile is used to compile the source file and most of the Makefile
consists of macros, which are defined in the command string created by
CompFile.
It sounds quite complicated, but the filename processing etc. needs not to
be done in ARM code. In addition to that, the shell is a standalone program
and if someone should want to use it with a different compiler, it can be
modified easily. If a file is dragged to its icon the shell simply starts
the obey file !CompFile quoting the filename of the source file as a
parameter. If configure is chosen from the menu, the file !Configure is
started.
9.) Shortcuts
F1: repeat last command (should not be used if last command was the
compilation of a C source file)
F2: repeat last compilation
If you drag a file to the shell window, its full path name appears in the
window as if it was typed in.
10.) Changes
Version 0.20:
- <CLI$Prompt> is now evaluated to give you the real command-line-feeling
(if you should have changed it)
- Repeat and Recompile option added
- The pathname of a file can be obtained by dragging it to the shell window
11.) Things to be done
- Sorry, there are no editing facilities yet ... I will do that as soon as I
have the time
- The screen is redrawn after a command has been processed. This is an
operating-system problem but could be solved
----------------------------------------------------------------------------
This program is shareware, i.e. it may be copied freely, provided that no
part of it is changed and that it is not sold for profit.
© 1992, Martin Wuerthner
Jahnstrasse 18
W-7034 Gaertringen
(Germany)
----------------------------------------------------------------------------